package com.itheima.service.Impl;

import com.itheima.service.MessageService;
import com.itheima.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private MessageService message;

    @Override
    public void order(String id) {
        System.out.println("订单处理开始");

        //将发送消息的请求转为消息放到请求队列中
        message.sendMessage(id);
        System.out.println("消息已放入消息队列中");


        System.out.println("订单处理结束");

    }
}
